package com.ruoyi.xysl.service;

import com.ruoyi.system.domain.vo.TreeSelect;
import com.xysl.api.domain.XyslMenu;

import java.util.List;

/**
 * 菜单Service接口
 *
 * @author xysl
 * @date 2025-01-11
 */
public interface ISysXyslMenuService
{
    /**
     * 查询菜单
     *
     * @param id 菜单主键
     * @return 菜单
     */
    public XyslMenu selectXyslMenuById(Long id);

    /**
     * 查询菜单列表
     *
     * @param xyslMenu 菜单
     * @return 菜单集合
     */
    public List<XyslMenu> selectXyslMenuList(XyslMenu xyslMenu);


    public List<XyslMenu> buildMenuTree(List<XyslMenu> menus);

    /**
     * 构建前端所需要下拉树结构
     *
     * @param menus 菜单列表
     * @return 下拉树结构列表
     */
    public List<TreeSelect> buildMenuTreeSelect(List<XyslMenu> menus);

    public List<Long> selectMenuListByRoleId(Long roleId);

    /**
     * 新增菜单
     *
     * @param xyslMenu 菜单
     * @return 结果
     */
    public int insertXyslMenu(XyslMenu xyslMenu);

    /**
     * 修改菜单
     *
     * @param xyslMenu 菜单
     * @return 结果
     */
    public int updateXyslMenu(XyslMenu xyslMenu);

    /**
     * 批量删除菜单
     *
     * @param ids 需要删除的菜单主键集合
     * @return 结果
     */
    public int deleteXyslMenuByIds(Long[] ids);

    /**
     * 删除菜单信息
     *
     * @param id 菜单主键
     * @return 结果
     */
    public int deleteXyslMenuById(Long id);


}
